package cn.achao.csr.api.model.entity;

import cn.achao.csr.base.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 字典数据表
 * @TableName sys_dict_data
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "sys_dict_data")
public class SysDictData extends BaseEntity implements Serializable {
    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 字典排序
     */
    private Integer dictSort;

    /**
     * 字典标签
     */
    private String dictLabel;

    /**
     * 字典值
     */
    private String dictValue;

    /**
     * 字典类型
     */
    private String dictType;

    /**
     * 状态
     */
    private String status;

    /**
     * 昵称+(id)
     */
    private String createBy;

    /**
     * 昵称+(id)
     */
    private String updateBy;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    /**
     * 是否逻辑删除（1是，0否）
     */
    private Integer isDel;

    /**
     * 备注
     */
    private String remark;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     *  INSERT INTO `csr`.`leaf_alloc` (`biz_tag`, `max_id`, `step`, `description`)
     *  VALUES ('seq_sys_dict_data', 1, 100, 'seq_sys_dict_data主键');
     * @return
     */
    @Override
    public String sequenceCode() {
        return "seq_sys_dict_data";
    }

    public SysDictData(Boolean generateId) {
        super(generateId);
    }
}